home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Utilities / Workbench / MagicWB2.1p / Programs / Misc / DOpus_IconUpdateE.rexx < prev    next >
OS/2 REXX Batch file  |  1998-06-24  |  2KB  |  92 lines

  1. /* This script makes the process of updating older icons with MagicWB icons
  2. very easy for Directory-Opus users. Remarks: IconUpdate has to be in the C:
  3. directory. First, select the older icons to be changed. Second, select the
  4. source MagicWB-Icon and then activate the ARexx-script by clicking on the
  5. appropriate button (has to be configured by the user first). Have fun! */
  6.  
  7.  
  8. ADDRESS 'DOPUS.1'
  9. OPTIONS RESULTS
  10. CHECKABORT
  11. BUSY ON
  12.  
  13.  
  14. STATUS 3
  15. window = RESULT
  16. STATUS 9 window
  17. anzahl = RESULT
  18. 'STATUS 13 -1'
  19. path_source = RESULT
  20.  
  21.  
  22. IF anzahl > 1 THEN DO
  23.   TOPTEXT 'ERROR: More than ONE MagicWB-Icon can NOT be selected as source icon!'
  24.   BEEP
  25.   BUSY OFF
  26.   EXIT
  27. END
  28.  
  29.  
  30. GETSELECTEDFILES
  31. files_a = RESULT
  32.  
  33. IF files_a = 'RESULT' THEN DO
  34.  TOPTEXT 'ERROR: You have to specify BOTH source and destination icons!'
  35.  BEEP
  36.  BUSY OFF
  37.  EXIT
  38. END
  39.  
  40.  
  41. PARSE VAR files_a icon_new files_a
  42.  
  43.  
  44. OTHERWINDOW
  45.  
  46.  
  47. STATUS 3
  48. window = RESULT
  49. STATUS 9 window
  50. anzahl = RESULT+1
  51. 'STATUS 13 -1'
  52. path_destination = RESULT
  53.  
  54.  
  55.  
  56. GETSELECTEDFILES
  57. files_b = RESULT
  58.  
  59. IF files_b = "RESULT" THEN DO
  60.  TOPTEXT 'ERROR: You have to specify BOTH source and destination icons!'
  61.  BEEP
  62.  BUSY OFF
  63.  EXIT
  64. END
  65.  
  66.  
  67. n = anzahl
  68. DO UNTIL n = 1
  69.     CHECKABORT
  70.     ergebnis = RESULT
  71.     IF ergebnis = 1 THEN DO
  72.     TOPTEXT 'Operation ABORTED by user!'
  73.     BUSY OFF
  74.     EXIT
  75.     END
  76.   n = n-1
  77.   PARSE VAR files_b icon_old.n files_b
  78.  
  79.   TOPTEXT 'Updating old icon ->' icon_old.n 'with ->' icon_new
  80.  
  81.   ADDRESS COMMAND IconUpdate TCSDNW path_source||icon_new path_destination||icon_old.n
  82. END
  83.  
  84.  
  85. STATUS 3
  86. window = RESULT
  87. RESCAN window
  88.  
  89. OTHERWINDOW
  90.  
  91. BUSY OFF
  92.